package com.hhkj.admin.student.mapper;

import com.hhkj.admin.student.model.dopo.StudentLoginLogDo;
import com.hhkj.admin.student.model.dopo.StudentLoginLogPo;
import com.hhkj.admin.student.model.dopo.StudentLoginTimesCountPo;
import com.ruoyi.common.base.biz.mapper.BaseMapper;
import com.ruoyi.system.domain.StudentLoginLog;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 学员登录日志Mapper接口
 *
 * @author ruoyi
 * @since 2023-05-22
 */
@Mapper
@CacheNamespace
public interface StudentLoginLogMapper extends BaseMapper<StudentLoginLog, StudentLoginLogDo, StudentLoginLogPo> {


    /**
     * 根据学员id和课程id 统计对应学员的登录次数信息
     *
     * @param studentIdList 学生id列表
     * @return 学员的登录次数信息列表
     */
    List<StudentLoginTimesCountPo> listCountLoginByStudentIdListAndCourseIdList(
            @Param("studentIdList") List<Long> studentIdList);


    List<StudentLoginLog> courseIdSetGroupByIdCardAfterDate(@Param("idCardList") List<String> idCardList,
                                                            @Param("timeStart") Date timeStart,
                                                            @Param("timeEnd") Date timeEnd);
}
